//
//  ViewController.swift
//  XUtilities
//
//  Created by anru on 09/04/2024.
//  Copyright (c) 2024 anru. All rights reserved.
//

import UIKit
import XUtilities

class ViewController: UIViewController {

    lazy var textLab: UILabel = {
        return .build { label in
            label.text = "aaa";
        }
    }()
    
    var btn: UIButton = .build { button in
        button.setTitle("按钮", for: .normal)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
//        self.navigationController?.navigationBar.isTranslucent = false
        self.view.insetsLayoutMarginsFromSafeArea = true
        print(StatusBarHeight, TopSafeHeight, NavigationBarHeight, TabbarSafeAreaHeight, TabbarHeight, TopSafeHeightAndNaviBarHeight)
    }
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        let insets = self.view.safeAreaInsets
        print("Safe Area Insets: \(insets)", self.view.layoutMargins)
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

